import { http } from "@/utils/http";
import { baseUrlApi } from "@/api/utils";
/*角色 列表*/
export const getRoleList = (params?) => {
  return http.request("get", baseUrlApi("/role/roleList"), { params });
};
/*角色管理- 添加角色*/
export const addAgentByAgent = async (data?: object) => {
  return http.request("post", baseUrlApi("sysUser/add"), { data });
};
/*角色管理- 编辑角色*/
export const editRole = async (data?: object) => {
  return http.request("post", baseUrlApi("/sysUser/edit"), { data });
};
/*用户列表*/
export const queryRoleList = (params?) => {
  return http.request("get", baseUrlApi("sysUser/sysUserList"), { params });
};
/*角色-删除*/
export const removeAgentByAgent = (params?) => {
  return http.request("get", baseUrlApi("sysUser/delete"), { params });
};
/*角色-重置用户密码*/
export const resetRolePassword = (params?) => {
  return http.request("get", baseUrlApi("/sysUser/resetPassword"), { params });
};

//修改登录密码-修改密码
export const captchaSMS = (params: any) => {
  return http.request("get", baseUrlApi("sysUser/editPassword"), { params });
};
/*枚举*/
export const enums = (params?) => {
  return http.request("get", baseUrlApi("base/enums"), {
    params
  });
};
